package cn.findviewbydream.evil.bigtoutiao.base;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import butterknife.ButterKnife;

/********************************************
 * 工程名：MOtoWaiter
 * 包名：cn.findviewbydream.evil.motowaiter.base
 * 时间：17-1-17
 * 作者：白雨濃 evil
 * 邮箱：evilbai@foxmail.com
 * 内容：
 ********************************************/
public abstract class BaseActivity extends AppCompatActivity
{
    @Override
    protected final void onCreate(@Nullable Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(setContentViewId());
        ButterKnife.bind(this);
        onActivityCreate(savedInstanceState);
    }

    @Override
    protected void onStart()
    {
        super.onStart();
    }

    @Override
    protected void onDestroy()
    {
        super.onDestroy();
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data)
    {
        super.onActivityResult(requestCode, resultCode, data);
    }

    @LayoutRes
    public abstract int setContentViewId();

    public abstract void onActivityCreate(Bundle savedInstanceState);

    protected abstract void initView();

}
